#include <REGX52.H>
#include "LCD1602.h"
#include "DELAY.h"
#include                     "MatrixKey.h"

unsigned char KeyNum;

void main()
{
  LCD_Init();
	while(1)
	{
		LCD_ShowString(1,1,"HelloWorld");
		KeyNum=MatrixKey();
		if(KeyNum)//不加判断会一直显示00，只有按下的一瞬间会变成keynum
		LCD_ShowNum(2,1,KeyNum,2);
	}
}
